ric( $amount ) ) { $errors[] = self::get_error_response_data( self::ERROR_OFFER_CREATE_FAILURE, sprintf( 'Invalid amount string: %s', $amount ) ); return null; } $woocommerce_currency = get_woocommerce_currency(); if ( strtolower( $currency ) !== strtolower( $woocommerce_currency ) ) { $errors[] = self::get_error_response_data( self::ERROR_OFFER_CREATE_FAILURE, sprintf( 'Provided currency (%s) does not match store currency (%s)', $currency, $woocommerce_currency ) ); return null; } return $amount; } }